package cn.doit.scala.day05.high_function.yinshi

/**
 * @DATE 2021/12/30/19:49
 * @Author MDK
 * @Version 2021.2.2
 * */
object C07_隐式变量03 {
  /*
  * 不仅参数可以隐式调用  函数也可以调用
  *
  * */
  import MyImplicitValue.f
  def m(x:Int, y:Int)(implicit f:(Int,Int)=>Int): Int ={
    f(x,y)
  }
  def m2(x:Int)(implicit f:(Int,Int)=>Int): Int ={
    f(x,x)
  }
  def main(args: Array[String]): Unit = {
    val res1 = m(2, 3)
    val res2 = m2(3)
    println(res1)
    println(res2)
  }
}
